package com.hnichr.ump.common.assessment.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.hnichr.ump.common.entity.UmpEntity;
import com.mxpioframework.jpa.annotation.Generator;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "t_assessment_template")
@Schema(description = "邮件/短信模板表")
public class Template extends UmpEntity {
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id ;

    @Column(name = "NAME_")
    @Schema(description = "模板名称")
    private String name ;

    @Column(name = "SUBJECT_")
    @Schema(description = "主题")
    private String subject ;

    @Column(name = "template_type_")
    @Schema(description = "模板类型 0:系统默认；1:租户自定义")
    private String templateType ;

    @Column(name = "channel_")
    @Schema(description = "渠道 0:邮件；1:短信")
    private String channel ;

    @Column(name = "TEMPLATE_CREATE_DATE_")
    @Schema(description = "模板创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date templateCreateTime ;
}
